package com.wuwei.elearning.messageQueen;

import com.wuwei.elearning.dto.ConversionMessage;

import java.time.LocalDateTime;

/**
 * Interface for message producers
 */
public interface MessageProducer {
    /**
     * Send a message to the queue
     * 
     * @param topic The topic to send the message to
     * @param payload The message payload
     * @return The created message
     */
    ConversionMessage send(String topic, Object payload,Long id);
    
    /**
     * Send a message to the queue with a specific priority
     * 
     * @param topic The topic to send the message to
     * @param payload The message payload
     * @param priority The message priority (higher number means higher priority)
     * @return The created message
     */
    ConversionMessage send(String topic, Object payload, int priority,Long id);
    
    /**
     * Schedule a message to be sent at a specific time
     * 
     * @param topic The topic to send the message to
     * @param payload The message payload
     * @param scheduledTime The time at which the message should be processed
     * @return The created message
     */
    ConversionMessage schedule(String topic, Object payload, LocalDateTime scheduledTime);
} 